﻿@{
    Layout = null;
}
<html class="en no-webview-bar">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title></title>
    <meta charset="utf-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width,user-scalable=no, initial-scale=1,maximum-scale=1,viewport-fit=cover">
    <meta content="telephone=no" name="format-detection">
    <meta name="apple-touch-fullscreen" content="yes">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <script src="/App_Content/js/jquery-1.11.1.min.js"></script>
    <link href="/App_Content/2.0/style/main.css" rel="stylesheet" />
    <style>
    body .swiper-pagination { position: absolute; left: 50%; bottom: 10px; width: 200px; text-align: center; margin-left: -100px; }
    body .swiper-pagination-bullet { background: #fff; margin: 0 0 0 10px; }
    body .swiper-pagination-bullet-active { background: #17adc1; }
    .page-top img{width: 100%;margin: auto;display: block}
    .page-top .top-banner-m{display: none;}
    .con{top:0;}
    @@media (max-width: 500px){
        .con {
            top: 0 !important;
        }
        .page-top .top-banner-m{display: block;}
        .page-top .top-banner{display: none;}
    }
    </style>
</head>
<body>

    <div class="page-top">
        <img  class="top-banner" />
    </div>


    <div class="con" style="position: relative">
        <div class="back" id="back"></div>

        <div class="content clearfix">


            <div class="contentLeft">

                <!--轮播图修改1012-->

                <div class="section-focus-pic" id="section-focus-pic">
                    <div class="swiper-container" style="overflow:visible;">
                        <ul class="swiper-wrapper"></ul>
                    </div>
                    <div class="swiper-pagination"></div>
                </div>


                <div class="article-list">
                </div>
                <a href="#" class="btn-more">
                    查看更多
                </a>

            </div>

            <div class="contentRight" style="margin-top:30px">
                <div class="conR_up">
                    <p>热门资讯</p>
                    <div></div>
                </div>

            </div>

            <div class="adlist_hide" style="display:none">
            </div>
            <!--ad start-->
            <!--ad end-->

        </div>

        <!--通用底部 开始-->
        <div class="footer">
            <div class="footer-wrap">
                <div class="mini-hide" style="width:300px">

                    <img src="/App_Content/qrcode.jpg" class="qr-hlq">

                    <p>京ICP备16057532号-2</p>
                    <p>Copyright  2018 汽湃智讯网版权</p>
                    <a href="/pages/about?catalogId=a54cb75a-b50b-4def-ad73-df37ebdaa5ba&amp;page=lxwm">关于我们</a>
                </div>
            </div>
            <!--通用底部 结束--> <!--通用底部 结束-->
            <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.2/css/swiper.min.css" />
            <script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.2/js/swiper.min.js"></script>
            <script src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
            <script src="/WX/Weixins/JSConfig?debug=false&urlReferrer=http://greatauto.cn/?catalogId=d0d0de26-770b-4c93-aff5-18d0287a724d|page=hy&r=636952633429988714"></script>
            <script src="/App_Content/Script/weixin-script.js"></script>

            <script>
                var queryStr = window.location.search
                var rootUrl = 'http://greatauto.cn'
                var catalogId = queryString('catalogId')
                console.log('catalogId',catalogId)
                var key = queryString('key')
                var page = 'ccf7'
                function queryString(name) {
                    name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
                    var regexS = "[\\?&]" + name + "=([^&#]*)";
                    var regex = new RegExp(regexS);
                    var results = regex.exec(window.location);
                    if (results == null) {
                        return "";
                    } else {
                        return decodeURIComponent(results[1].replace(/\+/g, " "));
                    }
                }



                var Page = {
                    pageNo: 1
                    , pageSize: 20
                    , getList: function () {
                        $('.btn-more').html('加载中...');
                        var url = '/cms/Articles/read';

                        $.getJSON(url, {
                            pageNo: Page.pageNo
                            , pageSize: Page.pageSize
                            , ResultType: 'Json'
                            , OrderBy: 'PublishTime Desc'
                            //, catalogKey: page
                            //, title: queryString('title')
                            , CatalogId: catalogId
                        }, function (data) {
                            Page.isLoading = false;
                            $('.btn-more').html('查看更多')
                            var count = data.Total;
                            data = data.Data;

                            var h = '';
                            $.each(data, function (i, item) {
                                h += '<div class="article clearfix  feedlist ">';
                                h += '                      <div class="img">';
                                h += '        <a href="/Articles/Detail?key=' + item.Key + '&page=1" target="_blank">';
                                h += '            <img src="' + item.TitleImageUrl + '"  alt="" style="width:199px;height:150px;">';
                                h += '        </a>';
                                h += '    </div>';

                                h += '<div class="words">';
                                h += '    <div class="part1 clearfix">';
                                h += '        <div class="title">';
                                h += '            <a href="/Articles/Detail?key=' + item.Key + '&page=1" target="_blank">' + item.Title + '</a>';
                                h += '        </div>';
                                h += '    </div>';
                                h += '    <div class="part2">';
                                h += '        <span class="icon-time iconfont">' + item.PublishTime.substring(5, 10).replace('-', '/') + '</span>';

                                h += '        <span class="iconfont icon-view">' + item.ViewCount + '</span>';

                                h += '    </div>';
                                h += '    <div class="part3">';
                                h += '        <a href="/Articles/Detail?key=' + item.Key + '&page=1" class="word" target="_blank">';
                                h += (item.Summary || '');
                                h += '        </a>';
                                h += '    </div>';
                                h += '</div>';
                                h += '</div>';

                            });
                            $('.article-list').append(h);
                            if (Page.pageNo * Page.pageSize >= count) {
                                $('.btn-more').remove();
                            }
                        });
                    }
                    , getAdList: function () {
                        var url = '/cms/Articles/read'
                        $.getJSON(url, {
                            pageNo: 1
                            , pageSize: 5
                            , ResultType: 'Json'
                            , catalogkey: 'gg_xzt'
                        }, function (data) {

                            data = data.Data;

                            var h = '';
                            $.each(data, function (i, item) {
                                h += '<li class="item swiper-slide"  >';
                                h += '<a href="/Articles/Detail?key=' + item.TransferUrl + '&page=1" target="_blank">';
                                h += '<img src="' + item.TitleImageUrl + '" width="570" height="300">';
                                h += '</a>';
                                h += '</li>';
                            });
                            $('.swiper-wrapper').html(h);
                            var swiper = new Swiper('.swiper-container', {
                                pagination: '.swiper-pagination',
                                paginationClickable: true
                            });

                            var swiperWidth = $('#section-focus-pic').width();
                            var sriperHeight = swiperWidth * 0.6;
                            $('.section-focus-pic').css({
                                "height": sriperHeight + "px"
                            })
                            var swiperLi = $(".section-focus-pic ul li");

                            $(".section-focus-pic ul li a img").css({
                                "height": sriperHeight + "px"
                            })

                            for (var i = 0; i < swiperLi.length; i++) {
                                swiperLi[i].style.left = i * swiperWidth + 'px'
                            }

                        });
                    }
                    , getHotList: function () {
                        var url = '/cms/Articles/Read'
                        $.getJSON(url, {
                            pageNo: 1
                            , pageSize: 5
                            , ResultType: 'Json'
                            , OrderBy: 'ViewCount Desc'
                            , catalogId: catalogId
                        }, function (data) {
                            data = data.Data;
                            var h = '';
                            h += '<p>热门资讯</p><br>';
                            $.each(data, function (i, item) {
                                h += '<div class="">';
                                h += '    <div class="sign"></div>';
                                h += '    <div class="s_content">';
                                h += '<a href="/Articles/Detail?key=' + item.Key + '&page=1" target="_blank">' + item.Title + '</a>';
                                h += '   </div>';
                                h += '</div>';
                            });
                            $('.conR_up').html(h);
                        });
                    },
                    getDetail: function () {
                        var url = '/cms/catalogs/Detail'
                        $.getJSON(url, {
                            key: key
                        }, function (data) {
                            $('.page-top .top-banner') &&  ($('.page-top .top-banner')[0].src = data.BannerUrl)
                            // $('.page-top .top-banner-m') && ($('.page-top .top-banner-m')[0].src = data.ImageUrl)
                            console.log(data);
                        })
                    }
                    , isLoading: false
                };

                $(function () {
                    $('.btn-more').on('click', function () {
                        if (!Page.isLoading) {
                            Page.isLoading = true;
                            Page.pageNo++;
                            Page.getList();
                        }
                        return false;
                    });
                });
                Page.getAdList();

                Page.getList();
                Page.getHotList();
                Page.getDetail();
            </script>
            <script>
                $(function () {
                    //----------分享-----------
                    var shareTitle = $("#shareTitle").val();
                    var shareContent = $("#shareContent").val();
                    var imgUrl = $("#shareImage").val();
                    var shareUrl = location.href;//$("#shareUrl").val();
                    var appId = '';
                    var reportfunc = {
                        success: function () {
                        }
                        , cancel: function () {
                        }
                    };
                    initShare(shareTitle, shareContent, imgUrl, shareUrl, appId, reportfunc);
                    //----------分享-----------
                });
            </script>
            <script>
                var _hmt = _hmt || [];
                (function () {
                    var hm = document.createElement("script");
                    hm.src = "https://hm.baidu.com/hm.js?aafe01bf471df8c45e29872a27a259ae";
                    var s = document.getElementsByTagName("script")[0];
                    s.parentNode.insertBefore(hm, s);
                })();
            </script>

</body>
</html>

